<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
	<ui:composition template="./main.xhtml">
		<ui:define name="content">
		<f:event listener="#{dayController.initialize}" type="preRenderView"></f:event>
		<br/>
		<h:form>
			<p:dataTable value="#{dayController.dailyList}" var="record" styleClass="noWrap">
				<p:column headerText="名前">
					<h:outputText value="#{record.daily.staff.formalName}"/>
				</p:column>
				<p:column headerText="作業時間">
					<h:outputText value="#{record.workTime}"/>
				</p:column>
				<p:column headerText="内容" styleClass="pre left">
					<h:outputText value="#{record.daily.content}"/>
				</p:column>
				<p:column>
					<p:commandButton action="#{dayController.editDaily}" value="#{record.daily.entityId eq null ? '入力':'編集'}" rendered="#{record.editPermission}" styleClass="button_small">
						<f:setPropertyActionListener target="#{dayConversation.selectDaily}" value="#{record.daily}"/>
					</p:commandButton>
				</p:column>
			</p:dataTable>
			<br/>
			<p:commandButton ajax="false" action="#{excelController.outputDay}" value="Excel出力" styleClass="button_big"/>
		</h:form>
		</ui:define>
	</ui:composition>
</html>